import axios from './axios'
export function getClient(params = { limit: 9999 }) {
  return axios({
    url: '/customer/list',
    params
  })
}
//客戶新增
export function postClient(params) {
  return axios({
    method: 'post',
    url: '/customer/insert',
    params
  })
}

//客戶新增(批量)
export function postClientList(params) {
  return axios({
    method: 'post',
    url: '/customer/insertList',
    data: params
  })
}
export function deleteClient(params) {
  return axios({
    method: 'delete',
    url: '/customer/delete',
    params
  })
}
//客户调转
export function postClient1(data) {
  return axios({
    method: 'post',
    url: '/customer/turn',
    data
  })
}
//查询调出客户数据
export function getClient2(params) {
  return axios({
    url: '/customer/getCustomerNoList',
    params
  })
}
//查询vip客户资料
export function getClient3(params = {}) {
  return axios({
    url: '/vip/getVipList',
    params
  })
}
//vip顾客资料
export function postClient2(params) {
  return axios({
    method: 'post',
    url: '/vip/insert',
    params
  })
}

// 逻辑删除VIP数据
export function deleteVip(params) {
  return axios({
    method: 'delete',
    url: '/vip/delete',
    params
  })
}

// 修改VIP数据
export function putVip(params) {
  return axios({
    method: 'put',
    url: '/vip/update',
    params
  })
}

//编辑 修改
export function putClient(params) {
  return axios({
    method: 'put',
    url: '/customer/update',
    params
  })
}
//导入
export function postExcelClient(data) {
  return axios({
    method: 'post',
    url: '/customer/importExcel',
    data
  })
}
//客户库存表查询  一维
export function getCI(params) {
  return axios({
    // method:'post',
    // url:'/repertory-one-log/customerInventoryQueryByOne',
    url: '/customer-inventory-one-log/customerInventoryQueryByOne',
    // url:'input-out-save-repertory-one/getInputRepertoryOne',
    params
  })
}
//合计
export function getSum(params) {
  return axios({
    url: '/customer-inventory-one-log/customerInventorySum',
    params
  })
}

//客户库存表 二维
export function getTwoCI(params) {
  return axios({
    // method:'post',
    // url:'/repertory-two-log/customerInventoryTwoQuery',
    url: '/customer-inventory-two-log/customerInventoryTwoQuery',
    // url:'input-out-save-repertory-two/getInputTwo',
    params
  })
}
//合计
export function getSum1(params) {
  return axios({
    url: '/customer-inventory-two-log/customerInventoryTwoSum',
    params
  })
}

// 综合查询
export function integratedQuery(params) {
  return axios({
    url: '/customer/integratedQuery',
    params
  })
}

// 未配客户
export function noDistributionCustomers() {
  return axios({
    url: '/customer/noDistributionCustomers'
  })
}

// 客户对账汇总查询
export function customerAccounts(params) {
  return axios({
    url: '/customer/customerAccounts',
    params
  })
}

// 客户寄卖对账单查询
export function customerConsignment(params) {
  return axios({
    url: '/customer/customerConsignment',
    params
  })
}

// 客户对账明细与汇总查询
export function consignmentInfo(params) {
  return axios({
    url: '/customer/consignmentInfo',
    params
  })
}
//新建查詢客戶配貨品牌
export function fundBrand(params) {
  return axios({
    // url:'/kinds-number/brandedNameList',
    url: 'branded/getBrandedNameList',
    params
  })
}
//根據品牌查詢客戶編號品牌名稱
export function getBrand(params) {
  return axios({
    url: '/branded-sell-discount/list',
    params
  })
}
export function getBrandList(params) {
  return axios({
    url: '/branded-sell-discount/listPlus',
    params
  })
}

//客戶建檔新建表格 新增銷售品牌折數
export function addDiscount(data) {
  return axios({
    method: 'post',
    url: '/branded-sell-discount/save',
    data
  })
}

//客戶建檔新建表格 修改銷售折數
export function putDiscount(data) {
  return axios({
    method: 'post',
    url: '/branded-sell-discount/save',
    data
  })
}
//客户建档 授权
export function getPower(params) {
  return axios({
    method: 'post',
    url: '/customer/authorization',
    params
  })
}

//根据客户查分店
export function getShop(params) {
  return axios({
    url: '/customer/getBranch',
    params
  })
}
